Conversation
kompotkot
reviewed
Nov 27, 2024
added 6 commits
November 27, 2024 17:41
Add env MOONSTREAM_DB_V3_CONTROLLER_API.
kompotkot
reviewed
Dec 18, 2024
| Determines the table names based on the blockchain and labels version. | ||
| Returns an empty dictionary if blockchain is not provided. | ||
| """ | ||
| if not request_data.blockchain: |
Contributor
There was a problem hiding this comment.
Maybe better to throw exception here?
Contributor
Author
There was a problem hiding this comment.
No need that resolution just for return block_number and block_timestamp.
That enough for see state of database but if was send actual blockchain you can see even more related to query data.
added 10 commits
December 18, 2024 17:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added V3 support fo state tasks
QueryAPI sql Handling Improvements:
resolve_table_namesandprepare_queryfunctions to dynamically resolve table names and prepare SQL queries with placeholders replaced by actual table names (crawlers/mooncrawl/mooncrawl/actions.py). [1] [2]QueryTextClauseExceptionfor handling errors when transforming queries toTextClause(crawlers/mooncrawl/mooncrawl/actions.py).queries_data_update_handlerto use the new query preparation functions and handle exceptions accordingly (crawlers/mooncrawl/mooncrawl/api.py). [1] [2]Blockchain Support Enhancements:
AvailableBlockchainTypewith corresponding environment variables and configurations (crawlers/mooncrawl/mooncrawl/blockchain.py,crawlers/mooncrawl/mooncrawl/settings.py). [1] [2] [3] [4]Data Model Updates:
ViewTasksmodel to include optionalcustomer_id,instance_id, andv3fields (crawlers/mooncrawl/mooncrawl/data.py).These changes collectively improve the flexibility and robustness of the Mooncrawl project's query handling and blockchain support.State jobs have ability run over v3 instaces.
Added --customer-db-uri parameter.
new types of jobs available.
[{ "customer_id": "uuid", "instance_id": int, "v3": true, "type": "function", "stateMutability": "view", "inputs": [], "name": "symbol", "constant": true, "payable": false, "outputs": [ { "name": "", "type": "string" } ], "address": { "customer_id": "uuid", "instance_id": int, "type": "queryAPI", "query_url": "template_arbitrum_gateway_tokens", "blockchain": "<chain>", "params": { "address": "<address>" }, "keys": [ "address" ] } }]